using 高校员工餐饮信息管理系统.Models;

namespace 高校员工餐饮信息管理系统.Services
{
    /// <summary>
    /// 用户服务接口
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 用户认证
        /// </summary>
        /// <param name="workId">工号</param>
        /// <param name="password">密码</param>
        /// <returns>用户信息</returns>
        Task<User?> AuthenticateAsync(string workId, string password);
        
        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="workId">工号</param>
        /// <param name="email">邮箱</param>
        /// <returns>是否成功</returns>
        Task<bool> ResetPasswordAsync(string workId, string email);
        
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="workId">工号</param>
        /// <param name="oldPassword">旧密码</param>
        /// <param name="newPassword">新密码</param>
        /// <returns>是否成功</returns>
        Task<bool> ChangePasswordAsync(string workId, string oldPassword, string newPassword);
        
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="workId">工号</param>
        /// <returns>用户信息</returns>
        Task<User?> GetUserByWorkIdAsync(string workId);
    }
}

